// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

@ccclass
export default class PanelCtrl extends cc.Component {

    @property(cc.Node)

    help: cc.Node = null;

    @property(cc.Node)

    result: cc.Node = null;

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {}

    start () {

    }

    openHelp() {
        this.help.active = true;
    }
    closeHelp() {
        this.help.active = false;
    }
    openResult() {
        this.result.active = true;
    }
    closeResult() {
        this.result.active = false;
    }

    playAgain() {
        cc.director.loadScene("crazy8");
    }

    // update (dt) {}
}
